<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="http://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
    <h1>{{num}}</h1>
    <input type="text" v-model="num">
    <button @click="num++">增加</button>
    <button @click="num--">减少</button>
</div>

<script type="text/javascript">
    var app = new Vue({
        el:"#app",
        data:{
            num:1,
        },
        methods:{
            stopClick(){
                console.log("stop click")
            }
        }
    });
</script>

</body>
</html>